Game system, program and image generating method

ABSTRACT

An object is to provide a game system, program and image generating method which can effectively generate an image having an edge line of higher quality. The image of an edge line EDL of an object OB is changed depending on a distance between the object and the viewpoint or the size of the perspectively transformed object OB. As the distance between the object and the viewpoint increases or as the size of the perspectively transformed object decreases, the color of the edge line of the object gradually becomes the second color. The color of the edge line begins to become the second color at a threshold value VTN. The color of the edge line is set to the second color at another threshold value VTF. As the distance between the object and the viewpoint increase or as the size of the perspectively transformed object decreases, the image of the edge line of the object is made more transparent. When the distance between the object and the viewpoint (or the size of the object) is substantially equal to a distance in the viewpoint follow mode, the color or translucency of the edge line is maintained substantially constant. When the distance between the object and the viewpoint is at the threshold value VTF, the image of the edge line substantially disappears. The image of the edge line is drawn in the outside or inside area of the object.

TECHNICAL FIELD

The present invention relates to a game system, program and imagegenerating method.

BACKGROUND OF ART

There is known a game system which can generate an image as viewed froma given viewpoint within an object space that is a virtualthree-dimensional space. Such a game system is highly popular from thefact that it can provide a so-called virtual reality. If the game systemis for a roll-playing game (RPG), a player can enjoy the game bycontrolling a character (or object) allocated to the player to move iton a map within the object space so that the player will fight againstan enemy character, dialogue with any other character or visit variouscities and towns.

In such a game system, an object representing a character is configuredby a plurality of polygons or free-form surfaces (which are primitivesurfaces in a broad sense). The image as viewed from the given viewpointwithin the object space will be generated by arranging the object(model) configured by these polygons within the object space and thenperforming the geometry-processing (or three-dimensional computation)with respect to the object. Thus, the image can be generated in a morerealistic form as if it exists in the real world scene.

On the other hand, the field of animated cartoon makes an appeal toplayers by using an image similar to a cellular picture specific to theanimation, rather than a realistic image actually photographed.

The game picture generated by the conventional game system can make anappeal to a person that likes the reality, but would not make an appealto a person that likes the animation.

To overcome such a problem, the inventors have developed a game systemwhich can generate a cellular image in real-time. The generation of thecellular image requires a process of drawing the edge line of an objectincluding a character or the like (or a process of emphasizing the edgeline).

However, it has bee found that such a process contains the followingproblem.

It is now assumed that an edge line having its thickness equal to onepixel is to be drawn around the outer periphery of an object. In such acase, a problem is not substantially raised if the distance between theviewpoint and the object becomes nearer (or if the object is largerelative to pixels on the screen) However, if the distance between theviewpoint and the object is farther (or if the object is small relativeto pixels on the screen), an unnatural image will be generated since thethickness of the edge line will unnecessarily be increased relative tothe size of the object.

DISCLOSURE OF INVENTION

The present invention provides a game system which performs imagegeneration, comprising: means which draws an image of an edge line of anobject; means which changes the image of the edge line of the objectdepending on a distance from a viewpoint; and means which generates animage as viewed from a given viewpoint within an object space.

The present invention further provides a game system which performsimage generation, comprising: means which draws an image of an edge lineof an object; means which changes the image of the edge line of theobject depending on a size of the object that has been perspectivelytransformed; and means which generates an image as viewed from a givenviewpoint within an object space.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a functional block diagram of a game system according to thisembodiment of the present invention.

FIG. 2 is an image generated according to this embodiment.

FIG. 3 illustrates a problem raised from the fact that if the distancebetween an object and the viewpoint increases (or if the size of aperspectively transformed object decreases), the edge line of the objectwill unnecessarily be conspicuous.

FIG. 4 illustrates a technique of changing the color of the edge linedepending on the distance between the object and the viewpoint or thesize of the perspectively transformed object.

FIG. 5A shows the characteristic of a function between the distancebetween the object and the viewpoint and the color of the edge linewhile

FIG. 5B shows the characteristic of a function between the size of theperspectively transformed object and the color of the edge line.

FIG. 6 illustrates a technique of changing the translucency of the edgeline depending on the distance between the object and the viewpoint orthe size of the perspectively transformed object.

FIG. 7A shows the characteristic of a function between the distancebetween the object and the viewpoint and the translucency of the edgeline while

FIG. 7B shows the characteristic of a function between the size of theperspectively transformed object and the translucency of the edge line.

FIGS. 8A and 8B illustrate a technique of setting a threshold value VTN.

FIGS. 9A and 9B illustrate a problem raised in a technique ofcontrolling the color of the edge line.

FIGS. 10A and 10B illustrate a technique of drawing edge lines along theoutside and inside areas of the edge of an object.

FIGS. 11A and 11B illustrate a problem raised if an edge line is to bedrawn along the outside area of edge of the object.

FIG. 12 illustrates the bi-linear filtering type texture mapping.

FIG. 13A shows a mapping image while FIG. 13B shows an image obtained bymapping the mapping image on a virtual polygon.

FIG. 14 illustrates a technique of generating the image of an edge lineby effectively using the bi-linear filtering type texture mapping.

FIG. 15 illustrates the principle of a phenomenon in which the color ofeach pixel exudes into the surrounding region through the bi-linearfiltering type interpolation.

FIGS. 16A and 16B illustrate a technique of generating a virtualpolygon.

FIGS. 17A and 17B illustrate a technique of generating a virtual polygonbased on the coordinates of vertexes in a perspectively transformedobject.

FIGS. 18A and 18B illustrate a technique of generating a virtual polygonbased on the coordinates of vertexes in a perspectively transformedsimplified object.

FIG. 19 shows a mapping image generated on a work buffer.

FIG. 20 illustrates a technique of drawing a mapping image on a framebuffer by mapping it on a virtual polygon through the bi-linearfiltering process while shifting the texture coordinates.

FIG. 21 shows an image generated on the frame buffer through thetechnique of FIG. 20.

FIG. 22 illustrates a technique of interpolating the RGBs and alpha (α)values of pixels through the bi-linear filtering process.

FIGS. 23A and 23B illustrate a technique of generating the image of anedge line of an object.

FIG. 24 illustrates a technique of preventing the whole object frombeing drawn into a defocused image.

FIG. 25 shows an alpha plane generated on the frame buffer.

FIG. 26 shows an-original object image and alpha plane generated on theframe buffer.

FIG. 27 illustrates a technique of drawing a mapping image on the framebuffer by mapping it on a virtual polygon through the bi-linearfiltering process while shifting the texture coordinates by +0.5 pixels.

FIG. 28 shows an image generated on the frame buffer through thetechnique of FIG. 27.

FIG. 29 illustrates a technique of generating the image of an edge lineof an object.

FIG. 30 illustrates a technique of drawing a mapping image on the framebuffer by mapping it on a virtual polygon through the bi-linearfiltering process while shifting the texture coordinates by −0.5 pixels.

FIG. 31 shows a final image generated on the frame buffer through thetechnique of FIG. 30.

FIG. 32 is a flowchart illustrating the details of the process accordingto this embodiment.

FIG. 33 is a flowchart illustrating the details of the process accordingto this embodiment.

FIG. 34 is a flowchart illustrating the details of the process accordingto this embodiment.

FIG. 35 is a flowchart illustrating the details of the process accordingto this embodiment.

FIG. 36 is a flowchart illustrating the details of the process accordingto this embodiment.

FIG. 37 is a flowchart illustrating the details of the process accordingto this embodiment.

FIG. 38 is a flowchart illustrating the details of the process accordingto this embodiment.

FIG. 39 is a flowchart illustrating the details of the process accordingto this embodiment.

FIG. 40 shows a hardware structure by which this embodiment can berealized.

FIGS. 41A, 41B and 41C show various system forms to which thisembodiment can be applied.

FIGS. 42A to 42F illustrate various other techniques of drawing the edgeline.

FIGS. 43A and 43B shows another characteristic of a function between thedistance between the object and the viewpoint, the size of theperspectively transformed object and the color and translucency of theedge line.

BEST FORMS FOR CARRYING OUT THE INVENTION

In view of the aforementioned problems, one embodiment of the presentinvention provides a game system, program and image generating methodwhich can effectively generate the image of an edge line with higherquality.

Embodiments of the present invention will now be described.

The embodiments are not intended to limit the contents of the presentinvention as defined in the appending claims. Moreover, all thecomponents described in connection with the embodiments are notnecessarily essential for carrying out the present invention.

An embodiment of the present invention provides a game system whichperforms image generation, comprising: means which draws an image of anedge line of an object; means which changes the image of the edge lineof the object depending on a distance from a viewpoint; and means whichgenerates an image as viewed from a given viewpoint within an objectspace. A computer-usable program embodied on an information storagemedium or in a carrier wave according to this embodiment of the presentinvention comprises a processing routine for executing theabove-described means.

According to this embodiment, the image of the edge line changes inrespect to any of various parameters thereof such as color, translucency(density), brightness, tint, lightness or chroma, depending on thedistance from the viewpoint. Thus, the image of the edge line can beformed into a high-quality image optimally matching the distance fromthe viewpoint.

The distance from the viewpoint may be any of various parameters such asdepth distance, linear distance between the viewpoint and the object andother equivalent distances.

The object, the edge line of which is to be drawn, may be the entiremodel object or an object part (or sub-object) that is one of partsobjects configuring a model object.

The technique of drawing the edge line of the object is desirably onethat shifts the texture coordinates through the texel interpolation, butnot limited to such a technique.

In the game system, program and image generating method according tothis embodiment, as the distance from the viewpoint increases, a colorof the edge line of the object may gradually become a given second colorThus, the color of the edge line of the object may become the second orinconspicuous color when the distance between the object and theviewpoint increases.

In the game system, program and image generating method according tothis embodiment, when the distance from the viewpoint is substantiallyequal to a distance when the viewpoint follows the object whilemaintaining a substantially constant distance from the object, the colorof the edge line of the object may be maintained substantially constant.Thus, in a mode in which the viewpoint follows the object whilemaintaining the distance between the object and the viewpointsubstantially constant, the color of the edge line of the object hardlychanges, thereby generating a more natural image.

In the game system, program and image generating method according tothis embodiment, the color of the edge line of the object may be set tothe second color when the distance from the viewpoint becomes largerthan a given threshold value. Thus, the aforementioned problem that therelative thickness of the edge line will be more conspicuous can surelybe prevented by setting the color of the edge line to the second colorwhen the distance between the object and the viewpoint becomes largerthan the given threshold value.

In the game system, program and image generating method according tothis embodiment, as the distance from the viewpoint increases, the imageof the edge line of the object may gradually become more transparent.Thus, the image of the edge line can be made more inconspicuous bydecreasing the density in the image of the edge line as the distancebetween the object and the viewpoint increases.

In the game system, program and image generating method according tothis embodiment, when the distance from the viewpoint is substantiallyequal to a distance when the viewpoint follows the object whilemaintaining a substantially constant distance from the object, atranslucency of the edge line of the object may be maintainedsubstantially constant Thus, in a mode in which the viewpoint followsthe object while maintaining the distance between the object and theviewpoint substantially constant, the translucency (density) of the edgeline of the object hardly changes, thereby generating a more naturalimage.

In the game system, program and image generating method according tothis embodiment, the image of the edge line of the object maysubstantially disappear when the distance from the viewpoint becomeslarger than a given threshold value. Thus, the aforementioned problemthat the relative thickness of the edge line will be more conspicuouscan surely be prevented by making the image of the edge line completelytransparent when the distance between the object and the viewpointbecomes larger than the given threshold value.

An embodiment of the present invention further provides a game systemwhich performs image generation, comprising: means which draws an imageof an edge line of an object; means which changes the image of the edgeline of the object depending on a size of the object that has beenperspectively transformed; and means which generates an image as viewedfrom a given viewpoint within an object space. A computer-usable programembodied on an information storage medium or in a carrier wave accordingto this embodiment of the present invention comprises a processingroutine for executing the above-described means.

According to this embodiment, the image of the edge line changes inrespect to any of various parameters thereof such as color, translucency(density), brightness, tint, lightness or chroma, depending on the sizeof the perspectively transformed object (size relative to the pixel).Thus, the image of the edge line can be formed into a high-quality imageoptimally matching the size of the object.

The size of the object may be any of various parameters such as thetotal number of pixels in the object (or the number of longitudinalpixels×the number of transverse pixels), the number of longitudinalpixels, the number of transverse pixels and so on.

Alternatively, the size of the object may be that of a virtual objectwhich encloses the image of the perspectively transformed object and thesize of which changes depending on the size of the perspectivelytransformed object.

In the game system, program and image generating method according tothis embodiment, as the size of the perspectively transformed objectdecreases, color of the edge line of the object may gradually become agiven second color. Thus, the color of the edge line of the object maybecome the second or inconspicuous color when the size of the object onthe screen becomes smaller.

In the game system, program and image generating method according tothis embodiment, when the size of the perspectively transformed objectis substantially equal to a size of the object when the viewpointfollows the object while maintaining a substantially constant distancefrom the object, the color of the edge line of the object may bemaintained substantially constant. Thus, in a mode in which theviewpoint follows the object while maintaining the distance between theobject and the viewpoint substantially constant, the color of the edgeline of the object hardly changes, thereby generating a more naturalimage.

In the game system, program and image generating method according tothis embodiment, the color of the edge line of the object may be set tothe second color when the size of the perspectively transformed objectbecomes smaller than a given threshold value. Thus, the aforementionedproblem that the relative thickness of the edge line becomes moreconspicuous can surely be prevented by setting the color of the edgeline to the second color when the size of the perspectively transformedobject becomes smaller than a given threshold value.

In the game system, program and image generating method according tothis embodiment, as the size of the perspectively transformed objectdecreases, the image of the edge line of the object may gradually becomemore transparent. Thus, when the size of the object on the screen issmaller, the image of the edge line can be made more inconspicuous bydecreasing the density of the image of the edge line of the object.

In the game system, program and image generating method according tothis embodiment, when the size of the perspectively transformed objectis substantially equal to a size of the object when the viewpointfollows the object while maintaining a substantially constant distancefrom the object, a translucency of the edge line of the object may bemaintained substantially constant. Thus, in a mode in which theviewpoint follows the object while maintaining the distance between theobject and the viewpoint substantially constant, the translucency(density) of the edge line of the object hardly changes, therebygenerating a more natural image.

In the game system, program and image generating method according tothis embodiment, the image of the edge line of the object maysubstantially disappear when the size of the perspectively transformedobject becomes smaller than a given threshold value. Thus, theaforementioned problem that the relative thickness of the edge line willbe more conspicuous can surely be prevented by making the image of theedge line completely transparent when the size of the object becomessmaller than the given threshold value.

In the game system, program and image generating method according tothis embodiment, the image of the edge line of the object may be drawnin an outside area of edge of the object. In this case, it is desirableto use a technique of changing the color of the edge line depending onthe distance from the viewpoint or the size of the perspectivelytransformed object when the edge line is drawn in the outside area ofthe edge of the object.

If the edge line is to be drawn in the outside area of the edge of theobject, at least part of the edge line may be drawn in the outside areaof the edge while the other edge line part may he drawn in the insidearea of the edge.

In the game system, program and image generating method according tothis embodiment, the image of the edge line of the object may be drawnin an inside area of edge of the object. In this case, it is desirableto take a technique of changing the translucency (density) of the edgeline depending on the distance from the viewpoint or the size of theperspectively transformed object when the edge line is drawn in theinside area of the edge of the object.

The preferred embodiment of the present invention will be described inmore detail with reference to the drawings.

1. Configuration

FIG. 1 shows a block diagram of a game system (image generating system)according to this embodiment. In this figure, this embodiment maycomprise at least a processing section 100 (or a processing section 100with a storage section 170). Each of the other blocks may take anysuitable form.

A control section 160 is used to input operational data from the playerand the function thereof may be realized through any suitable hardwaremeans such as a lever, a button, a housing or the like.

The storage section 170 provides a working area for the processingsection 100, communication section 196 and others. The function thereofmay be realized by any suitable hardware means such as RAM or the like.

An information storage medium (which may be a computer-usable storagemedium) 180 is designed to store information including programs, dataand others. The function thereof may be realized through any suitablehardware means such as optical memory disk (CD or DVD), magneto-opticaldisk (MO), magnetic disk, hard disk, magnetic tape, memory (ROM) or thelike. The processing section 100 performs various processings in thepresent invention (or this embodiment) based on the information that hasbeen stored in this information storage medium 180. In other words, theinformation storage medium 180 stores various pieces of information (orprograms and data) for executing the means of the present invention (orthis embodiment) which are particularly represented by the blocksincluded in the processing section 100.

Part or the whole of the information stored in the information storagemedium 180 will be transferred to the storage section 170 when thesystem is initially powered on. The information stored in theinformation storage medium 180 may contain at least one of program codeset for processing the present invention, image data, sound data, shapedata of objects to be displayed, table data, list data, information forinstructing the processings in the present invention, information forperforming the processings according to these instructions and so on.

A display section 190 is to output an image generated according to thisembodiment and the function thereof can be realized by any suitablehardware means such as CRT, LCD or HMD (Head-Mount Display).

A sound output section 192 is to output a sound generated according tothis embodiment and the function thereof can be realized by any suitablehardware means such as speaker.

A portable information storage device 194 is to store the player'spersonal data and save data and may be take any suitable is form such asmemory card, portable game machine and so on.

A communication section 196 is designed to perform various controls forcommunication between the game system and any external device (e.g.,host device or other image generating system). The function thereof maybe realized through any suitable hardware means such as various types ofprocessors or communication ASIS or according to any suitable program.

The program or data for executing the means in the present invention (orthis embodiment) may be delivered from an information storage mediumincluded in a host device (or server) to the information storage medium180 through a network and the communication section 196. The use of suchan information storage medium in the hose device (or server) fallswithin the scope of the invention.

The processing section (processor) 100 is to perform various processingssuch as game processing, image generating or sound generating, based onthe control data or program from the control section 160. The functionof the processing section 100 may be realized by any suitable processor(CPU, DSP or the like), any suitable hardware means such as ASIC (gatearray or the like) or a given program (game program).

The processing section 100 may be designed to perform various processessuch as coin (or charge) reception, setting of various modes, gameproceeding, setting of scene selection, determination of the positionand rotation angle (about X-, Y- or Z-axis) of an object, movement ofthe object (motion processing), determination of the position of theviewpoint (or virtual camera) and the angle of visual line (or therotational angle of the virtual camera), arrangement of the objectwithin the object space, hit checking, computation of the game results(or scores), processing for causing a plurality of players to play in acommon game space and various other game processings includinggame-over.

The processing section 100 generates an image as viewed from a givenviewpoint (or virtual camera) within the object space, based on theaforementioned game processing results and then outputs it toward thedisplay section 190.

The processing section 100 further performs various sound processings togenerate BGMs, sound effects or voices, based on the aforementioned gameprocessing results and then outputs the sounds toward the sound outputsection 190.

All the functions of the image and sound processing sections 140, 150may be realized by any suitable hardware means or according to theprogram. Alternatively, these functions may be realized by both thehardware means and program.

The processing section 100 comprises a geometry-processing section 110,a virtual object generating section 112, an edge-line image changingsection 114 and a drawing section 120.

The geometry-processing section 110 is to perform variousgeometry-processings (or three-dimensional computation) such ascoordinate transformation, clipping, perspective transformation orlight-source computation with reference to the object. The resultingdrawing data (such as vertex coordinates, texture coordinates, color(brightness) data, normal vector or alpha value) is stored and saved ina main storage section 172 of the storage section 170.

The virtual object generating section 112 is to generate a virtualobject onto which a mapping image is to be mapped. This mapping image isgenerated by a mapping image generating section 122 included in thedrawing section 120 as will be described later.

In this embodiment, this virtual object (which is, in a narrow sense, avirtual polygon) is one that encloses the whole or part of the image ofan object after perspectively transformed or transformed into the screencoordinate system and that changes its size depending on the size of theperspectively transformed object. In other words, the size of thevirtual object changes depending on the screen area occupied by theobject. The mapping image generated by the mapping image generatingsection 122 will be mapped onto such a virtual object. Therefore, thetexture mapping and virtual object drawing processes can moreeffectively be performed.

The edge-line image changing section 114 is to change the image of anedge line to be applied to the object depending on the distance betweenthe object and the viewpoint or the size of the perspectivelytransformed object (size relative to the pixel).

More particularly, the edge-line image changing section 114 is toperform a process of making the color of the edge line a given secondcolor (which includes a process of setting first and second colors, aprocess of determining an interpolation coefficient used to interpolatebetween the first and second colors and other processes), depending onthe distance between the object and the viewpoint or the size of theperspectively transformed object (or the size of the object on thescreen).

Alternatively, the edge-line image changing section 114 maytransparentize the image of the edge line of the object, depending onthe distance between the object and the viewpoint or the size of theobject. In other words, the edge-line image changing section 114 mayperform a process of synthesizing the images of the object and its edgeline together to form a translucent synthesized image having itstranslucency which is determined depending on the distance between theobject and the viewpoint or the size of the perspectively transformedobject. including a process of determining the translucency, a processof determining the order of drawing and so on.

The drawing section (or object/edge-line drawing section) 120 is to drawa geometry-processed object (model) or the edge line of the object in adrawing region 174 which can store the image information by pixel, suchas frame buffer or work buffer.

More particularly, the drawing section 120 performs the drawing processso that the image of the edge line generated by the image of the object(e.g. the image of the perspectively transformed object or the image ofthe object on the drawing region) will be drawn in the outside or insidearea of the edge of the object.

The drawing section 120 comprises a mapping image generating section122, a texture mapping section 130, a synthesizing section 132 and ahidden-surface removal section 134.

The mapping image generating section 122 is to generate a mapping imagewhich includes object color information set relative to the inside areaof the edge of the object and edge color information set relative to theoutside area of the edge of the object.

The texture mapping section 130 is to map a texture stored in a texturestorage section 176 onto the object.

More particularly, the texture mapping section 130 performs a process ofmapping the mapping image generated by the mapping image generatingsection 122 onto a virtual object generated by the virtual objectgenerating section 112. At this time, the texture mapping section 130maps the generated mapping image onto the virtual object through thetexel interpolation (which is, in a narrow sense, a bi-linear filter)while shifting the texture coordinates, for example, by a value smallerthan one texel (or pixel). For example, the texture coordinates may beshifted from such texture coordinates as obtained based on the positionin which the mapping image is drawn. Thus, the edge line of the objectcan be drawn with reduced processing load.

The synthesizing section 132 is to perform a mask process or atranslucence processing using an alpha (α) value. The alpha value(A-value) is information stored relating to each of the pixels. Forexample, the alpha value may be additional information other than colorinformation. The alpha value can be used as mask information,translucency (which is equivalent to transparency or opacity), bumpinformation and so on.

The hidden-surface removal section 134 is to use z-buffer (or z-plane)storing Z-value (or depth value) for performing the hidden-surfaceremoval according to the algorism of Z-buffer process.

For example, in the case that the edge line is to be drawn in theoutside area of the edge of the object, it is desirable that a Z-valueobtained based on the object information (vertex coordinates or thelike) is first set relative to a virtual object and that the virtualobject is then subjected to the hidden-surface removal based on the setZ-value. Thus, the optimum Z-value enabling the proper hidden-surfaceremoval can be set relative to the edge line through a simplifiedprocedure in which the z-value (or depth value) obtained from the objectinformation is simply set relative to the virtual object.

On the other hand, in the case that the edge line is to be drawn in theinside area of the edge of the object, it is desirable that the Z-valueof the object in the position in which the edge line is to be drawn isset as that of the edge line for performing the hidden-surface removalfor the edge line. Thus, the optimum Z-value can be set relative to theedge line to realize the proper hidden-surface removal between thatobject and another object.

The hidden-surface removal may be performed through the. depth sortingprocess (or Z sorting process) in which primitive surfaces are sorteddepending on the distance between the object and the viewpoint, therebydrawing the primitive surfaces sequentially starting from the farthestprimitive surfaces relative to the viewpoint.

The game system of this embodiment may be dedicated for a single-playermode in which only a single player can play the game or may have amulti-player mode in which a plurality of players can play the game.

If a plurality of players play the game, only a single terminal may beused to generate game images and sounds to be provided to all theplayers. Alternatively, a plurality of terminals interconnected througha network (transmission lien or communication line) may be used in thepresent invention.

2. Features of This Embodiment

2.1 Process of Changing the Image of the Edge Line

FIG. 2 shows a game image generated by the game system according to thisembodiment. As shown in FIG. 2, this embodiment successfully generates acellular picture-like image familiar to many people through the animatedcartoon by drawing a thick edge line along the edge of an object OBconfigured by polygons.

However, it has been found that such an edge-line drawing process raiseda problem in that if the distance between the object and the viewpointis farther (or the size of the perspectively transformed object issmaller), the relative thickness of the edge line unnecessarily becomesconspicuous (or is unnecessarily emphasized).

In a three-dimensional game, the viewpoint of a player (or virtualcamera) is moved to an arbitrary position depending on the operationalinput from the player. Thus, an object representing a character iscorrespondingly moved to an arbitrary position. This means that thedistance between the player's viewpoint and the object is also variableto change the size of the perspectively transformed object (or therelative size of the object relative to the pixel on the screen).

If an edge line having its constant thickness (e.g., one pixel) is to bedrawn relative to an object having its variable size, the followingproblem will be raised.

If the distance between the viewpoint and the object OB is nearer (e.g.,the screen area occupied by the object being larger) as shown by A1 inFIG. 3, the edge line EDL of the object is not very conspicuous, therebyproviding a natural image.

However, if the distance between the viewpoint and the object OB isfarther (e.g., the screen area occupied by the object being smaller) asshown by A2 and A3 in FIG. 3, the edge line EDL of the object isunnecessarily conspicuous, thereby providing an unnatural image.

Particularly, if the total number of pixels in the object OB (the numberof longitudinal pixels×the number of transverse pixels) becomes equal to1 to 10 pixels as shown by A3, the object OB will be looked as if it isfilled with the color of the edge line EDL. If the color of the objectOB is red while the color of the edge line EDL is black, the image ofthe object OB, which should inherently be looked to be red, will belooked as if it is a black-colored spot.

To overcome this problem, this embodiment changes the image of the edgeline of the object, depending on the distance between the object and theviewpoint or the size of the perspectively transformed object. In thiscase, the technique of changing the image of the edge line may be eitherof a technique of changing the color of the edge line or a technique ofchanging the translucency (density) of the edge line.

2.2 Process of Changing the Color of the Edge Line

When the color of the edge line is to be changed, it may graduallybecome a given second color as the distance between the object and theviewpoint increases or as the size of the perspectively transformedobject (or the size of the object relative to the pixel) decreases.

More particularly, as shown by B1 and B2 in FIG. 4, the color of theedge line EDL is determined through the interpolation between first andsecond colors so that the color of the edge line EDL on the object OBgradually changes from the first or deeper color to the second orthinner color, as the distance between the object and the viewpointincreases (or the size of the perspectively transformed objectdecreases) As the distance between the object and the viewpoint issufficiently farther (or the size of the perspectively transformedobject is sufficiently smaller), the color of the edge line EDL will bevery thin second color, as shown by B3.

As will be apparent from the comparison between A2 of FIGS. 3 and B3 ofFIG. 4, this can overcome such a problem that the thickness of the edgeline EDL is unnecessarily conspicuous. As will also be apparent from thecomparison between A3 of FIG. 3 and B3 of FIG. 4, such a problem thatthe object OB is looked as if it is filled with the color of the edgeline EDL can also be overcome. If it is assumed, for example, that thecolor of the object OB is red while the color of the edge line EDL isblack, the color of the object OB will not be filled with the blackcolor, thereby providing a more natural image, even though the distancebetween the object and the viewpoint sufficiently increases.

The technique of controlling the color of the edge line depending on thedistance between the object and the viewpoint or the size of the objectmay be any of various techniques.

If it is assumed, for example, that the distance between the object andthe viewpoint becomes larger than a threshold value VTN as shown in FIG.5A, the nearer-range or first color CN of the edge line begins to changegradually becomes the farther-range or second color CF. Thus, the edgeline will gradually be inconspicuous.

When the distance between the object and the viewpoint is larger thananother threshold value VTF, the color of the edge line is set to thefarther-range color CF The color of the edge line of the object is verythinned as shown by B3 in FIG. 4. Thus, such a problem that the objectwill be looked as if it is filled with the color of the edge line can beovercome.

In FIG. 5B, the nearer-range color CN of the edge line begins to changegradually into the farther-range color CF when the size of the objectbecomes smaller than the threshold VTN.

When the size of the object becomes smaller than the threshold VTF, thecolor of the edge line is set to CF. Thus. the edge line of the objectis very thinned as shown by B3 in FIG. 4.

By changing the color of the edge line depending on the distance betweenthe object and the viewpoint or the size of the perspectivelytransformed object in the aforementioned manner, the problem describedin connection with FIG. 3 can be overcome.

2.3 Process of Changing the Translucency of the Edge Line

When the translucency of the edge line is to be changed, the image ofthe edge line is made more transparent as the distance between theobject and the viewpoint increases or as the size of the perspectivelytransformed object decreases. For example, the image of the object maybe translucent-synthesized (or alpha blending) with the image of theedge line of the object using a translucency (which is equivalent totransparency or opacity) determined by the distance between the objectand the viewpoint or the size of the perspectively transformed object.

More particularly, as shown by C1 and C2 in FIG. 6, the edge line EDL ismade more transparent by changing the translucency of the edge line EDLof the object OB as the distance between the object and the viewpointincreases (or as the size of the perspectively transformed objectdecreases). If the distance between the object and the viewpointsufficiently increases (or the size of the perspectively transformedobject sufficiently decreases), the image of the edge line EDLsubstantially disappears, as shown by C3.

As will be apparent from the comparison between A2 of FIG. 3 and C2 ofFIG. 6, this can overcome such a problem that the thickness of the edgeline EDL is unnecessarily conspicuous. As will also be apparent from thecomparison between A3 of FIG. 3 and C3 of FIG. 6, such a problem thatthe object OB will be looked as if it is filled with the color of theedge line EDL can also be overcome. If it is assumed, for example, thatthe color of the object OB is red while the color of the edge line EDLis black, the color of the object OB is represented by its inherent redcolor without being filled with the black color, thereby providing amore natural image, even though the distance between the object and theviewpoint sufficiently increases.

The technique of controlling the translucency of the edge line dependingon the distance between the object and the viewpoint or the size of theobject may be any of various techniques.

For example, if the distance between the object and the viewpoint islarger than the threshold value VTN as shown in FIG. 7A, thetranslucency αT begins to change starting from its nearer-rangetranslucency αTN. Thus, the edge line of the object begins to betransparent. As a result, the edge line will gradually be inconspicuous.

When the distance between the object and the viewpoint is larger thanthe threshold value VTF, the translucency αT is set to the farther-rangetranslucency αTF. Thus, the edge line of the object is made completelytransparent (or disappears) as shown by C3 in FIG. 6. As a result, sucha situation that the object is filled with the color of the edge linecan be avoided.

FIG. 7B shows that as the size of the object is smaller than thethreshold value VTN, the translucency αT begins to change starting fromits nearer-range translucency αTN. Thus, the edge line of the objectbegins to be transparent.

When the size of the object is smaller than the threshold value VTF, thetranslucency αT is set to the farther-range translucency αTF. At thistime, the edge line of the object will be completely transparent (ordisappears) as shown by C3 in FIG. 6.

By changing the translucency of the edge line depending on the distancebetween the object and the viewpoint or the size of the perspectivelytransformed object in the aforementioned manner, the problem describedin connection with FIG. 3 can effectively be overcome.

Although it is particularly desirable from the viewpoint of processingload reduction that the distance from the viewpoint described inconnection with FIGS. 5A and 7A is the depth distance (or z-value) ofthe object (or its representative point), the present invention is notlimited to such an aspect. For example, it may be the linear distancebetween the viewpoint and the object. Alternatively, the distance fromthe viewpoint may be any of various other parameters which can providethe similar effect as in the depth distance or linear distance.

Although it is desirable from the viewpoint of processing load reductionthat the size of the object described in connection with FIGS. 5B and 7Bis represented by the total number of pixels (the number of longitudinalpixels×the number of transverse pixels) in the object, the presentinvention is not limited to such an aspect. For example, the size of theobject may be represented by either of the number of longitudinal pixelsor the number of transverse pixels. Alternatively, the size of theobject may be represented by any of various other parameters which canprovide the similar effect as in the number of pixels.

2.4 Setting of the Color and Translucency

When the object OB moves in the three-dimensional game, the viewpoint VP(or virtual camera) frequently follows the object OB while maintaining asubstantially constant distant ZVB between the object OB and theviewpoint VP, as shown in FIG. 8A.

In such situation, if the color or the translucency of the edge line isfrequently variable depending on the distance between the object and theviewpoint or the size of the object as shown in FIGS. 4 and 6, an imagelooked to be unnatural for a player will be generated.

To overcome such a problem, this embodiment maintains the color ortranslucency of the edge line of the object OB substantially constant ifthe distance between the object OB and the viewpoint VP is substantiallyequal to a distance ZVB held when the viewpoint VP follows the object OB(which will be referred to “the follow mode”). Alternatively, the coloror translucency of the edge line of the object OB is maintainedsubstantially constant if the size of the perspectively transformedobject OB is equal to that of the object in the follow mode (or the sizeof the object in the distance ZVB). More particularly, the thresholdvalue VTN has been set at a distance larger than the distance ZVB (or avalue smaller than the size of the object OB in the follow mode). Aswill be apparent from the functional characteristics of FIGS. 5A, 5E, 7Aand 7B, thus, the color or translucency of the edge line will not changein the follow mode. This can overcome the aforementioned problem that anunnatural image will be generated in the follow mode.

If there occurs any event releasing the follow mode and when thedistance between VP and OB becomes larger than the threshold value VTN(or the size of the object decreases), the color or translucency of theedge line will change depending on the distance between the object OBand the viewpoint VP or the size of the object OB as shown in FIGS. 4and 6. This can overcome such a problem that the occurrence of theaforementioned event increase the distance between the viewpoint and theobject to made the relative thickness of the edge line unnecessarilyconspicuous.

When the upper threshold value VTF (or a given threshold value) is setas shown in FIGS. 5A, 5B, 7A and 7B, the following advantages can beprovided.

If the edge line EDL is not colored by the second or thinner color or ifthe edge line EDL is not completely transparentized when the size of theobject OB decreases as shown by A3 of FIG. 3, there will be generated anunnatural image in which the object OB is looked as if it is filled withthe color of the edge line EDL.

The threshold value VTF has been set such value that the color of theedge line EDL is the second or thinner color or the edge line EDL iscompletely transparentized when the size of the object OB is as shown byA3 of FIG. 3. Thus, when the size of the object OB is as shown by A3 ofFIG. 3, the edge line EDL becomes inconspicuous as shown by B3 of FIG. 4or C3 of FIG. 6. This can prevent such a problem that such an unnaturalimage as shown by A3 of FIG. 3 will be generated.

By changing the color or translucency of the edge line between thethreshold values VTN and VTF, there can be overcome such a problem thatthe player can know when the color or translucency of the edge linechanges.

2.5 Advantages and Problems

The technique of controlling the color of the edge line shown in FIGS. 4to 5B does not require the translucence processing between the image ofthe edge line and the image of the object, unlike the technique ofcontrolling the translucency of the edge line shown in FIGS. 6 to 7B.Thus, the first-mentioned technique is advantageous in that it is notrequired to manage the order of drawing in the edge line or to performthe Z-sort process between the object in question and another object.

On the other hand, the technique of controlling the color of the edgeline in FIGS. 4 to 5B raises the following problem.

If the color of the object OB is monotone (e.g., only red), no problemoccurs. However, the color of the object OB is rarely monotone, and theobject OB on which the texture has been mapped is generally two or morecolors.

In such a case, the technique of controlling the color of the edge lineto make the thickness of the edge line EDL inconspicuous may not providea remarkable advantage.

In the case of FIG. 9A, the thickness of the edge line will not beconspicuous if the color of the edge line EDL is changed, for example,to thin red as the distance between the object and the viewpointincreases and even though the size of the object OB significantlydecreases.

In the case of FIG. 9B, the thickness of the edge line EDL will beinconspicuous at its part D1 if the color of the edge line EDL ischanged to the thinner red as the distance between the object and theviewpoint increases. However, the thickness of the edge line EDL will beleft conspicuous since the difference between the blue and red colors isconspicuous at another part D2 of the edge line.

On the contrary, the technique of controlling the translucency of theedge line shown in FIGS. 6 to 7B can make the thickness of the edge lineEDL inconspicuous as the distance is between the object and theviewpoint increases and even if the object OB is colored with two ormore colors as shown in FIG. 9B. In other words, the color of the edgeline at the part D1 gradually becomes the red color that is inherent inthe part D1 while the color of the edge line at the part D2 graduallybecomes the red color that is inherent in the part D2.

When the object OB is colored by two or more colors, the technique ofcontrolling the translucency of the edge line is advantageous over thetechnique of controlling the color of the edge line.

However, the technique of controlling the translucency of the edge lineis disadvantageous in that it requires a process of controlling theorder of drawing in the edge line.

Particularly, if the edge line EDL is to be drawn in the outside area ofthe edge line EDL of the object OB as shown in FIG. 10A, the Z-sortingprocess is required between the edge line EDL and another object OB2 (orbackground).

If the Z-sorting process (or hidden-surface removal) is not properlyperformed in such a case, a problem will be raised in that the edge lineEDL is hidden by the object OB2, as shown in FIG. 11A.

Even if the Z-sorting process is properly performed, the parts of theedge line EDL shown by E1 and E2 in FIG. 11B will be different in colorfrom each other. This will provide an unnatural image.

The technique of controlling the translucency of the edge line is notsuitable for the case where the edge line EDL is to be drawn in theoutside area of the edge ED as shown in FIG. 10A, but optimum for thecase where the edge line EDL is to be drawn in the inside area as shownin FIG. 10B. If the edge line is to be drawn in the inside area of theedge, such problems as shown in FIGS. 11A and 11B will not occur only bydrawing the object first and then drawing the edge line. This is becausethe object and edge line will properly be translucent-synthesized.

Reversely speaking, the technique of controlling the color of the edgeline described in connection with FIGS. 4 to 5B is advantageous if theedge line EDL is to be drawn in the outside area of the edge ED of theobject OB. The technique of controlling the color of the edge line hassuch problems as described in connection with FIGS. 9A and 9B, but isadvantageous in that it does not require to consider the order ofdrawing in the edge line and thus less possible to create such problemsas shown in FIGS. 11A and 11B.

2.6 Drawing of the Edge Line Using the Bi-Linear Filtering Type TextureMapping

This embodiment draws the edge line effectively using the bi-linearfiltering (in a broad sense, texel interpolation) type texture mapping.

The texture mapping may create a positional difference between the pixeland texel.

In such a case, the color CP (which is, in a broad sense, imageinformation) of a pixel (or sampling point) P in the point samplingmethod is equal to the color CA of a texel TA which is nearest to thepixel P. on the other hand, the color CP of the pixel P in the bi-linearfiltering method is equal to a color obtained by interpolating thecolors CA, CB, CC and CD of texels TA, TB, TC and TD which surround thepixel P.

More particularly, a coordinate ratio in the X-axis direction.β:1−β(0≦β≦1), and a coordinate ratio in the Y-axis direction,γ:1−γ(0≦γ≦1), are determined based on the coordinates of TA to TD and P.

In this case, the color CP of the pixel P (output color in the bi-linearfiltering method) will be represented by the following formula:CP=(1−β)×(1−γ)×CA+β×(1−γ)×CB+(1−β)×γ×CC+β×γ×CD  (1)

This embodiment draws the edge line utilizing the bi-linear filteringmethod in which the color is automatically interpolated.

More particularly, as shown in FIG. 13A, a mapping image is generated inwhich an object color is set in the inside area of the edge ED of theobject OB while an edge line color is set in the outside area of theedge ED. This mapping image is set as a texture, as shown by F1 in FIG.14. This texture is mapped on a virtual polygon (which is, in a broadsense, a virtual object) in the bi-linear filtering method, as shown byF2 in FIG. 14. At this time, texture coordinates given to the vertexesof the virtual polygon are shifted (or deviated or moved), for example,by (0.5, 0.5), in the lower-right direction.

Thus, the color of each of the pixels in the mapping image willautomatically infiltrates into the surrounding pixels through theinterpolation in the bi-linear filtering method. Therefore, the objectcolor will be mixed with the edge line color in the vicinity of the edgeof the object OB to draw the edge line EDL along the edge of the objectOB, as shown in FIG. 13B.

According to the technique of this embodiment, the image of the edgeline can be generated through the two-dimensional processing on thedrawing region. Therefore, this embodiment does not require anythree-dimensional processing such as a process of determining an angleincluded between the sight-line vector and the normal line. This canreduce the processing load on CPU.

According to the technique of this embodiment, the drawing procedureonto the drawing region only requires at least one drawing process forthe virtual polygon. This reduces the number of drawing processesnecessary to generate the image of the edge line, thereby significantlyreducing the processing load on the drawing processor.

It is now assumed that the vertexes VVX1, VVX2, VVX3 and VVX4 of avirtual polygon respectively have coordinates, (X, Y)=(X0, Y0), (X0,Y1), (X1, Y1) and (X1, Y0), respectively. If texture coordinates (U, V)given to the respective vertexes VVX1, VVX2, VVX3 and VVX4 of thevirtual polygon are respectively set to (X0, Y0), (X0, Y1), (X1, Y1) and(X1, Y0), the position of each of the pixels will coincide with theposition of the corresponding texel. Therefore, the color of each pixelwill not infiltrate into the surrounding pixels.

On the contrary, if the texture coordinates (U, V) given to therespective vertexes VVX1, VVX2, VVX3 and VVX4 of the virtual polygon arerespectively set to (X0+0.5. Y0+0.5). (X0+0.5, Y1+0.5), (X1+0.5, Y1+0.5)and (X1+0.5, Y0 +0.5), the position of each pixel will be deviated fromthe position of the corresponding texel. Therefore, the color of eachpixel will infiltrate into the surrounding pixels through the bi-linearfiltering type interpolation.

More particularly, if the bi-linear filtering type texture mapping iscarried out after the texture coordinates are shifted by 0.5 pixels(texels) in the lower-right direction, β=γ=½ in the above formula (1),If the colors of the texels T44, T45, T54 and T55 are respectively C44,C45, C54 and C55 in FIG. 15, therefore, the color CP44 of the pixel P44is represented by the following formula:CP 44=( C44+C45+C54+C55)/4  (2)

If the bi-linear filtering type texture mapping is carried out whileshifting the texture coordinates in the lower-right direction, the colorC44 of the texel T44, that is, the original color of the pixel P44 willinfiltrate into the pixels P33, P34, P43 and P44 by ¼, as shown in FIG.15. Thus, such an image of the edge line EDL as shown in FIG. 13B can begenerated to include the mixture of the edge line and object colors.

2.7 Generation of the Virtual Polygon

The virtual polygon to be mapped with the mapping image in FIG. 14 maytake any of various forms.

If the virtual polygon is one having its size equal to the screen size,the bi-linear filtering type interpolation will be applied to the wholescreen.

However, it has been found that when the virtual polygon having thescreen size is used, a problem was raised in that the edge line cannoteffectively be drawn.

In the three-dimensional game, the player's viewpoint is moved to anarbitrary position depending on the operational input from the player.The object representing the character or the like is also moved to anarbitrary position. Thus, the distance between the player's viewpointand the object also varies. The size of the perspectively transformedobject (or the screen area occupied by the object) will also varydepending on the distance between the viewpoint and the object.

If the distance between the viewpoint and the object OB is nearer asshown in FIG. 16A, the size of the perspectively transformed object OBincreases (or the screen area occupied by the object increases).

On the other hand, if the distance between the viewpoint and the objectOB is farther as shown in FIG. 16B, the size of the perspectivelytransformed object OB decreases (or the screen area occupied by theobject decreases).

If the screen area occupied by the object OB is larger as shown in FIG.16A, the processing will not be inefficient even though the virtualpolygon to be mapped with the mapping image has its size equal to thescreen size.

If the screen area occupied by the object OB is smaller as shown in FIG.16B, however, a useless drawing process will be carried out when thepolygon of the screen size is used. This unnecessarily increases theprocessing load.

To avoid such a problem, this embodiment generates a virtual polygon VPLof FIGS. 16A and 16B which encloses the image of the perspectivelytransformed object OB and which has its size variable depending on thesize of the perspectively transformed object OB. The mapping image (seeFIG. 13A) is then mapped on this virtual polygon VPL.

If the distance between the viewpoint and the object OB varies to changethe screen area occupied by the object OB, the size of the virtualpolygon VPL correspondingly varies. For example, as the distance betweenthe viewpoint and the object OB increases, the size of the virtualpolygon VPL decreases. Thus, the drawing process can effectively becarried out to optimize the load on the drawing process.

If the object is configured by object parts, a virtual polygon may begenerated for each of the object parts. If part of the object (e.g., eyeor mouth) is only to be processed, such a virtual polygon as enclosingpart of the perspectively transformed object may be generated.

The technique of generating the virtual polygon may take any of varioustechniques.

The first technique generates the virtual polygon VPL based on thecoordinates of the vertexes VX1 to VX6 (which are, in a broad sense,definition points including the control points of free-form surfaces) inthe perspectively transformed object, as shown in FIGS. 17A and 17B.

More particularly, the virtual polygon VPL will be generated bydetermining the vertexes VVX1 (XMIN, YMIN), VVX2 (XMIN, YMAX), VVX3(XMAX, YMAX) and VVX4 (XMAX. YMIN) of the virtual polygon VPL, based onthe minimum values XMIN, YMIN and maximum values XMAX, YMAX of the X-and Y-coordinates in the vertexes of the object OB.

Since the first technique can optimally reduce the size of the virtualpolygon VPL depending on the size of the perspectively transformedobject OB, it is advantageous in that the load on drawing the virtualpolygon VPL is reduced. On the other hand, it is disadvantageous in thatif the vertexes in the object OB is much more, the load on determiningthe minimum and maximum X- and Y-coordinates in the respective vertexesincreases.

The second technique uses a simplified object SOB (bounding box orbounding volume) which encloses the object OB. as shown in FIG. 18A.This simplified object SOB is used to perform hit checking or the likefor the object OB. This embodiment effectively uses this simplifiedobject SOB to generate the virtual polygon VPL based on the coordinatesof the vertexes (which are, in a broad sense, definition points) in aperspectively transformed simplified object SOB.

More particularly, the virtual polygon VPL is generated by determiningthe vertexes VVX1 to VVX4 of the virtual polygon VPL based on theminimum and maximum X- and Y-coordinates of the vertexes VSX1 to VSX8 inthe perspectively transformed simplified object SOB, as shown in FIG.18B.

The second technique has an advantage in that since it uses thesimplified object SOB having its vertexes less than those of the objectOB, the minimum and maximum X- and Y-coordinates of the vertexes can bedetermined with reduced load. On the other hand, the second techniquemust generate the virtual polygon VPL having its size larger than thatof the first technique. The second technique is thus disadvantageous inthat the load on drawing the virtual polygon VPL increases in comparisonwith the first technique.

The size of the virtual polygon VPL may be slightly larger in theup/down and right/left directions than that of the virtual polygon VPLshown in FIGS. 17A, 17B and 18B (e.g., by one pixel). Particularly, ifthe edge line is to be drawn in the outside area of the edge of theobject, the technique of scaling the size of the virtual polygon in sucha manner is effective.

The technique of changing the size of the virtual polygon VPL dependingon the size of the perspectively transformed object is not limited tothe aforementioned first and second techniques. For example, the size ofthe virtual polygon VPL may suitably be changed depending on thedistance between the viewpoint and the object.

If the translucency of the edge line is to be changed depending on thesize of the perspectively transformed object as described in connectionwith FIGS. 4, 5B, 6 and 7B, the translucency of the edge line may bechanged by determining and using the size (or number of pixels) of thevirtual polygon (virtual object) which is generated through thetechnique described in connection with FIGS. 16A to 18B.

2.8 Image of Edge Line

The technique of generating the image of the edge line of the objectwill be described below.

This embodiment generates the image of the edge line using the bi-linearfiltering type texture mapping processing described in the above item2.6.

2.8.1 Generation of Mapping Image

More particularly, the pre-procedure first initializes a work buffer(effect buffer) with the image information (RL, GL, BL, αL) of the edgeline. Namely, the color of each pixel is set to the color of the edgeline (RL, GL, BL) while the alpha value is set at αL (=0).

Next, an object OB to which the edge line is to be added is drawn in thework buffer. At this time, the alpha value in each of the vertexes ofthe object OB has been set at αJ (>0). For simplicity, it is assumedherein that the color of the object OB is a single color (RJ, GJ, BJ).

In such a situation, such an image as shown in FIG. 19 (mapping image)will be drawn in the work buffer.

In other words, the inside area of the edge ED of the object OB is setto the color of the same object OB while the outside area of the edge EDis set to the color of the edge line (RL, GL, BL). The alpha value inthe inside area is set at αJ (>0) while the alpha value in the outsidearea is set at αL (=0).

The setting of alpha value shown in FIG. 19 is shown only forillustration, but it is essential that the alpha value in the outsidearea is necessarily different from that of the inside area.

2.8.2 Bi-linear Filtering Type Texture Mapping

The mapping image on the work buffer shown in FIG. 19 is then drawn on aframe buffer at the same position.

More particularly, a virtual polygon (which is, in a broad sense, avirtual object) is drawn in the frame buffer while mapping the mappingimage on the work buffer onto the virtual polygon, as shown in FIG. 20.

In this case, there is generated a virtual polygon (effect region) whichencloses the object and which has its size variable depending on thesize of the perspectively transformed object. The mapping image on thework buffer is mapped onto this virtual polygon.

On performing this texture mapping:

(1) The hi-linear filter (texel interpolation) is selected;

(2) The texture coordinates are shifted (or deviated), for example, by+0.5 pixels (texels), as described in connection with FIG. 14; and

(3) In the source alpha (α) test (or alpha test for the mapping imagewhich is a writing source), only a pixel having α>0 (a pixel, α of whichis not equal to zero) is passed.

Thus, such an image as shown in FIG. 21 is generated in which the edgeline EDL is added to the object OB.

By selecting the bi-linear filter and shifting the texture coordinates,the interpolation will be carried out for the color and alpha value(A-value) which are set to each of the pixels in the mapping image onthe work buffer.

If it is now assumed that the texture coordinates (U, V) is shifted by+0.5 pixels (texels) and when the position of the drawn pixel is at (X,Y), the colors and alpha values at the positions of tour pixels (X, Y),(X+1, Y), (X, Y+1) and (X+1, Y+1) will be referred to on texturesampling. As a result. the color and alpha value of the finally drawntexel will be equal to the respective averages of the colors and alphavalues of the above four pixels. For example, if the texture coordinatesare shifted in the lower-right direction as shown in FIG. 22, the RGBsand alpha values of the pixels B, C and D will infiltrate into a pixel Aby ¼. This may be represented by the following formula:

$\begin{matrix}\begin{matrix}{{R = {( {{RA} + {RB} + {RC} + {RD}} )/4}},} \\{{G = {( {{GA} + {GB} + {GC} + {GD}} )/4}},} \\{{B = {( {{BA} + {BB} + {BC} + {BD}} )/4}},{and}} \\{\alpha = {( {{\alpha\; A} + {\alpha\; B} + {\alpha\; C} + {\alpha\; D}} )/4}}\end{matrix} & (3)\end{matrix}$

In the above formula, R. G, B and a are respectively the colors andalpha value obtained through the interpolation (or the colors and alphavalue of the interpolated pixel A). Furthermore, (RA, GA, BA, αA), (RB,GB, BB, αB), (RC, GC, BC, αC) and (RD, GD, BD, αD) are the colors andalpha values of the pixels A, B, C and D before interpolated,respectively.

As will be apparent from the foregoing, the RGBs and alpha values of thepixels B, C and D will infiltrate into the pixel A by ¼ by shifting thetexture coordinates by 0.5 pixels in the lower-right direction. As aresult, at a portion shown by H1 in FIG. 21, the color of the object OB(RJ, GJ, BJ) will be blended with the color of the edge line (RL, GL,BL) in the inside area of the edge ED to generate the image of the edgeline EDL in the inside area of the edge ED, as shown in FIG. 23A.

The color of this edge line (RL, CL, BL,) is the color set to theoutside area of the edge ED in the work buffer as shown in FIG. 19.

On the other hand, at another portion shown by H2 in FIG. 21, the colorof the object OB (RJ, GJ, BJ) will be blended with the color of the edgeline (RL, GL, BL) in the outside area of the edge ED to generate theimage of the edge line EDL in the outside area of the edge ED, as shownin FIG. 23B, In such a manner, the edge line EDL will be drawn along theedge ED of the object OB, as shown in FIG. 21.

In this embodiment, the alpha value will also be subjected to thebi-linear filtering type interpolation in addition to the Color. Thealpha value set to the edge line EDL will thus be obtained by blendingαJ of the object OB with αL in the edge line.

The above procedure will further be described in detail.

(I) Pixel Surrounded by Pixels to be Referred to, All of Which areColored with the Edge Line Color

In pixels as shown by I1 and I2 in FIGS. 23A and 23B, all the RGBs andalpha values of the surrounding pixels to be referred to are (RL, GL,BL, αL). In the aforementioned formula (3), therefore, (RA, GA, BA,αA)=(RB, GB, BB, αB)=(RC, GC, BC, αC)=(RD, GD, BD, αD)=(RL, GL, BL, αL).Thus, the RGB and alpha value after interpolated becomes (R, G, B,α)=(RL, GL, BL, αL).

Since α=αL=0 at this time (see FIG. 19), the source alpha (α) test doesnot pass such pixels. Therefore, these pixels are inhibited to be drawn.

(II) Pixel to be Referred to in Respect with the Pixels of Both the EdgeLine and Object Colors

Pixels as shown by I3 and I4 in FIGS. 23A and 23B are surrounded bypixels (texels) of (RL, GL, BL, αL) and pixels (texels) of (RJ, GJ, BJ,αJ). In such a case, if it is assumed that the number of pixels of (RJ,GJ, BJ, αJ) is K, (R, G, B, α) after interpolation through the aboveformula (3) are represented by the following formula:

$\begin{matrix}\begin{matrix}{{R = {\{ {{{RJ} \times K} + {{RL} \times ( {4 - K} )}} \}/4}},} \\{{G = {\{ {{{GJ} \times K} + {{GL} \times ( {4 - K} )}} \}/4}},} \\{{B = {\{ {{{BJ} \times K} + {{BL} \times ( {4 - K} )}} \}/4}},{and}} \\{\alpha = {\{ {{\alpha\; J \times K} + {\alpha\; L \times ( {4 - K} )}} \}/4}}\end{matrix} & (4)\end{matrix}$

As will be apparent, the color of the interpolated pixel will be coloredwith a color obtained by mixing the color (RJ, GJ, BJ, αJ) of the objectOB with the color (RL, GL, BL, αL) of the edge line.

Since αJ>0.1≦K≦3 and αL=0, 0<α<αJ. Therefore, the source alpha testpasses these pixels which will in turn be necessarily drawn.

(III) Pixel Surrounded by Pixels to be Referred to, All of Which areColored with the Object Color

In pixels as shown by I5 and I6 in FIGS. 23A and 23B, all the RGBs andalpha values of the surrounding pixels to be referred to are (RJ, GJ,BJ, αJ). In the aforementioned formula (3), therefore, (RA, CA, BA,αA)=(RB, GB, BB, αB)=(RC, GC, BC, αC)=(RD, GD, BD, αD)=(RJ, GJ, BJ, αJ).Thus, the RGB and alpha value after interpolated becomes (R, G, B,α)=(RJ, GJ, BJ, αJ).

Since α=αJ>0 at this time (see FIG. 19), the source alpha test passessuch pixels. Therefore, these pixels are drawn to be colored with theobject color.

In such a manner, such an image as shown in FIG. 21 can be drawn in theframe buffer.

In FIG. 21, the edge line EDL is also drawn in the outside area of theedge ED of the object OB. In this case, it is therefore desirable totake the technique of controlling the color of the edge line dependingon the distance between the object and the viewpoint or the size of theperspectively transformed object, as shown in FIGS. 4 to 5B describedabove.

However, the technique of FIG. 21 will apply the bi-linear filteringtype interpolation not only to the portion around the edge ED of theobject OB, but also the whole object OB. Thus, the defocused image ofthe whole object OB will be generated. To overcome such a problem, thisembodiment takes the following technique.

2.8.3 Drawing the Object into the Frame Buffer

As in the above item 2.8.2, the mapping image in the work buffer shownin FIG. 19 is drawn in the frame buffer at the same position. Moreparticularly, a virtual polygon is drawn in the frame buffer whilemapping the mapping image on the work buffer onto the virtual polygon.

In this case, as described in connection with FIGS. 16A to 18B, thevirtual polygon (effect region) is generated so that it encloses theobject and that it has its size variable depending on the size of theperspectively transformed object.

The source alpha test is carried out with the destination alpha test sothat the image of the edge line EDL drawn in FIG. 21 will not be erasedby any overwriting.

Namely, as shown in FIG. 24,

(1) The texture coordinates are not shifted;

(2) The source alpha test (or alpha test for the mapping image which isa writing source) passes only a pixel having α>0; and

(3) The destination alpha test (or alpha test for the mapping imagewhich is a written destination) passes only a pixel having α=αJ.

Under the above condition (1), the mapping image on the work buffer isdrawn in the frame buffer without being interpolated.

Under the above condition (2), any pixel set to the edge line coloramong the pixels in the mapping image (image in the work buffer) isinhibited to be drawn.

Under the above condition (3), any overwriting is inhibited relative tothe pixel region of 0<α<αJ in which the image of the edge line has beendrawn in FIG. 21. In other words, the focused image of the object OD onthe work buffer is drawn on only a region left by removing the region ofthe edge line EDL (more particularly, right and bottom edge lineportions) of the object OB from the inside area of the edge ED of theobject OB. Thus, the problem relating to the defocused image of thewhole object OB can be overcome.

One of the features of this embodiment is to use different alpha valuesin the inside and outside areas of the edge ED of the object OB (FIG.19) and to interpolate not only the color, but also the alpha value, theinterpolated alpha value being then used to perform variousdeterminations. More particularly, the interpolated alpha value is usedto discriminate the region (0<α<αJ) of the edge line EDL of the objectOB or to discriminate the other region left by removing the region ofthe edge line EDL from the inside area of the edge ED. Thus, the edgeline EDL of the object OB can be generated with reduced processing load.

2.9 Drawing the Edge Line into the Inside Area

The technique of drawing the edge line in the inside area of the edge ofthe object.

2.9.1 Generation of the Mapping Image

Such a mapping image as shown in FIG. 19 is first generated in the sametechnique as in the aforementioned item 2.8.1.

2.9.2 Generation of Alpha (Mask) Plane

Next, only the alpha (mask) plane in the mapping image on the workbuffer shown in FIG. 19 is drawn in the frame buffer.

More particularly, the virtual polygon is drawn in the frame bufferwhile mapping the mapping image on the work buffer onto the virtualpolygon to draw only the alpha (α) plane of the mapping image into theframe buffer, Thus, the alpha (mask) plane which is set at α=αJ(>0) inthe inside area of the edge ED of the object OB and at α=αL (=0) in theoutside area will be generated on the frame buffer, as shown in FIG. 25.

2.9.3 Drawing the Image of the Object

Next, the image of the object OB is drawn in the frame buffer. When theimage of the object OB has previously been drawn in the frame buffer,the image of the object can be translucent-synthesized (or alphablended) with the image of the edge line.

More particularly, the virtual polygon is drawn in the frame bufferwhile mapping the mapping image on the work buffer onto the virtualpolygon.

On this texture mapping,

(1) The alpha plane drawn in FIG. 25 is masked for not destroying it,and

(2) The source alpha test passes only a pixel having α=αJ.

As shown in FIG. 26, thus, the frame buffer will include the image ofthe object OB (original image) and the alpha plane generated in FIG. 25.

2.9.4 Bi-Linear Filtering Type Texture Mapping

Next, the mapping image on the work buffer shown in FIG. 19 is drawn inthe frame buffer at the same position.

More particularly, the virtual polygon is drawn in the frame bufferwhile mapping the mapping image on the work buffer onto the virtualpolygon, as shown in FIG. 27.

On performing this texture mapping:

(1) The bi-linear filter (texel interpolation) is selected;

(2) The texture coordinates are shifted (or deviated), for example, by+0.5 pixels (texels), as described in connection with FIG. 14;

(3) In the source alpha test, only a pixel having α<αJ is passed; and

(4) In the destination alpha test, only a pixel having α=αJ is passed.

Thus, such an image as shown in FIG. 28 is generated in which the edgeline EDL is added to the right and bottom edges in the inside area ofthe object OB.

In other words, at a portion shown by J1 in FIG. 28, the color of theobject OB (RJ, GJ, BJ) is blended with the color of the edge line (RL,GL, BL) in the inside area of the edge ED. thus, the image of the edgeline EDL will be generated in the inside area of the edge ED.

In addition to the color, this embodiment also processes the alpha valueset to the edge line EDL through the bi-linear filtering typeinterpolation. Therefore, the alpha value set to the edge line EDL isalso one obtained by blending αJ of the object OB with αL of the edgeline.

This procedure will further be described in detail. (I) Pixel surroundedby pixels to be referred to, all of which are colored with the edge linecolor In such a pixel as shown by K1 in FIG. 29, the RGBs and alphavalues after interpolated are (R, G, B, α)=(RL, GL, BL, αL).

Since α=αL=0 in set at this time (see FIG. 19), the source alpha testthat passes pixels of α<αJ is passed. However, the destination alphatest passing only the pixels of α=αJ does not pass any pixel in a regionother than the area in which the image of the object OB has been drawn.As a result, such an pixel as shown by K1 in FIG. 29 is inhibited to bedrawn.

(II) In a Pixel to be Referred to in Respect with the Pixels of Both theEdge Line and Object Colors.

In such a pixel as shown by K2 in FIG. 29, the interpolated (R, G, Banda) are similar to those of the formula (4) described in connection withthe above item 2.8.2. In other words, the color of the interpolatedpixel is one obtained by mixing the color of the object OB (RJ, GJ, BLJ,αJ) with the color of the edge line=(RL, GL, BL, αL).

Since αJ>0, 1≦K≦3 and αL=0, 0<α<αJ. Therefore, the source alpha testthat passes pixels of α<αJ is passed, which will in turn be drawn in theframe buffer.

By the destination alpha test for passing only the pixel of α=αJ, onlythe portions of the edge line image within the inside area of the object(or the right and bottom edges of the edge line in FIG. 28) will bedrawn in the frame buffer.

(III) Pixel Surrounded by Pixels to be Referred to are Colored with theObject Color

In such a pixel as shown by K3 in FIG. 29, the interpolated RGBs andalpha values are (R, G, B, α)=(RJ, GJ, BJ, αJ).

Since α=αJ is set at this time (see FIG. 19), the source alpha test thatpasses a pixel of α<αJ is not passed. Therefore, these pixels areinhibited to be drawn.

In such a manner, such an image as shown in FIG. 28 can be drawn in theframe buffer.

2.9.5 Drawing the Left and Top Edges of the Edge Line

Next, the mapping image on the work buffer shown in FIG. 19 is mapped onthe virtual object while shifting the texture coordinates in a directionopposite to that of the aforementioned item 2.9.4. The virtual object isthen drawn in the frame buffer.

More particularly, as shown in FIG. 30,

(1) The bi-linear filtering method is selected;

(2) The texture coordinates (U, V) are shifted (or deviated) by (−0.5,−0.5) reversely as in the aforementioned item 2.9.4;

(3) The source alpha test passes only a pixel of α<αJ; and

(4) The destination alpha test passes only a pixel of α=αJ.

Thus, the edge line EDL is also added to the left and top edges in theinside area of the object OB. Thus, the image including the edge lineEDL drawn in the inside area of the edge ED of the object OB will bedrawn.

3. Procedure of This Embodiment

The details of a procedure according to this embodiment will bedescribed in connection with flowcharts shown in FIGS. 32 to 39.

FIG. 32 shows a flowchart illustrating the process of generating avirtual polygon onto which a mapping image is to be mapped.

First of all, the geometry-processing is carried out relative to anobject to perspective-transform (or affine-transformed) it into thescreen (step S1.

Next, the minimum and maximum values XMN. YMIN and XMAX, YMAX in the X-and Y-coordinates of the object vertexes are determined based on thevertex coordinates of the perspectively transformed object (step S2).

Next, based on the determined (XMIN, YMIN) and (XMAX, YMAX), a virtualpolygon enclosing the image of the object OB is generated as describedin connection with FIGS. 17A and 17B (step S3). At this time, thevertexes VVX1 to VVX4 of the virtual polygon are as follows:

VVX1 (XMIN, YMIN),

VVX2 (XMIN, YMAX),

VVX3 (XMAX, YMAX), and

VVX4 (XMAX, YMIN).

The size of the virtual polygon (image effect region) may slightly beenlarged in the up/down and right/left directions. More particularly, ifit is assumed that the minimum values of the X- and Y-coordinates areXMIN, YMIN and that the maximum values thereof are XMAX, YMAX, each ofthe minimum values XMIN, YMIN is subtracted by one pixel to determineXMIN′=XMIN−1, YMIN′=YMIN−1. At the same time, each of the maximum valuesXMAX, YMAX is added by one pixel to determine XMAX′=XMAX+1,YMAX′=YMAX+1. These determined minimum and maximum values (XMIN′, YMIN′)and (XMAX′, YMAX′) are used to determine the vertexes VVX1 to VVX4 ofthe virtual polygon.

FIG. 33 shows a flowchart illustrating the process of generating thevirtual polygon using the simplified object of the object as describedin connection with FIGS. 18A and 18B.

FIG. 33 is different from FIG. 32 in that the perspective-transformationis performed relative to the simplified object at step S11 and that thevalues (XMIN, YMIN) and (XMAX, YMAX) are determined based on thecoordinates of the vertexes in the perspectively transformed simplifiedobject at step S12. The other steps are similar to those of FIG. 32.

FIG. 34 shows a flowchart illustrating the process of adding the edgeline to the object.

First of all, the work buffer is initialized with the image of the edgeline (RL, GL, BL, αL) as described in connection with FIG. 19 (stepS21).

Next, the object having its vertex alpha value set to α=αJ(>0) issubjected to the perspective-transformation and drawn in the work buffer(step S22). At this time, the hidden-surface removal will be performedusing the Z-buffer for the work buffer.

Next, the virtual polygon is drawn in the frame buffer while mapping themapping image on the work buffer onto the virtual polygon in thebi-linear filtering method while shifting the texture coordinates (stepS23). At this time, α>0 is specified as the source alpha test. Apseudo-Z-value obtained from the information of the object (e.g. vertexcoordinates, representative point coordinates and the like) has been seton the virtual polygon and the hidden-surface removal is preformed usingthe normal Z buffer.

Next, the virtual polygon is drawn in the frame buffer while mapping themapping image on the work buffer onto the virtual polygon (step S24). Atthis time. α>0 is specified as the source alpha test while α=αJ isspecified as the destination alpha test. A pseudo-Z-value obtained fromthe information of the object has been set on the virtual polygon andthe hidden-surface removal is preformed using the normal Z buffer.

Thus, the image of the object added by the edge line (or image havingits emphasized edge line) can be provided.

FIG. 35 shows a flowchart illustrating the process of adding the edgeline to the inside area of the object.

First of all, the work buffer is initialized with the image of the edgeline (RL, GL, BL, αL) as described in connection with FIG. 19 (stepS31).

Next, the object having its vertex alpha value set to α=αJ (>0) issubjected to the perspective-transformation and drawn in the work buffer(step S32). At this time, the hidden-surface removal will be performedby the Z-test using the normal Z-buffer. Thus, the Z-value of the objectin the position in which the edge line is drawn can be set as theZ-value of the edge line.

Next, as described in connection with FIG. 25, the mapping image on thework buffer is mapped onto the virtual polygon and only the alpha valueis drawn in the frame buffer (step S33).

Next, as described in connection with FIG. 26, the mapping image on thework buffer is mapped onto the virtual polygon and only the pixel ofα=αJ is drawn in the frame buffer (step S34). Thus, the original imageof the object can be drawn in the frame buffer.

Next, as described in connection with FIG. 27, the virtual polygon isdrawn in the frame buffer while mapping the mapping image on the workbuffer onto the virtual polygon through the bi-linear filtering methodwhile shifting the texture coordinates (U, V) by (0.5, 0.5) (step S35).At this time, α<αJ is specified as the source alpha test while α=αJ isspecified as the destination alpha test. Furthermore, the image of theobject is translucent-synthesized with the image of the edge line usingthe translucency αT which has been set at a given register.

Next, as described in connection with FIG. 30, the virtual polygon isdrawn in the frame buffer while mapping the mapping image on the workbuffer onto the virtual polygon through the bi-linear filtering methodwhile shifting the texture coordinates (U, V) by (−0.5, −0.5) (stepS36). At this time, α<αJ is specified as the source alpha test whileα=αJ is specified as the destination alpha test. Furthermore, the imageof the object is translucent-synthesized with the image of the edge lineusing the translucency αT which has been set at a given register.

The steps S33 to S36 in FIG. 35 will not perform the Z-test.

In such a manner, there can be provided such an image as shown in FIG.31 in which the edge line is drawn in the inside area of the object.

FIG. 36 shows a flowchart illustrating the process of changing the colorof the edge line depending on the distance (z-value). The Z-valueincreases as it approaches the viewpoint.

First of all, the threshold values ZN, ZF of the Z-value (whichcorrespond to VTN, VTF in FIG. 5A) as well as the colors CN, CF of thosethreshold values have previously been set (step S41).

Next, the representative Z-value of the object, the edge line of whichis to be drawn (Z-value at the representative point) is determined (stepS42).

Next, the determined representative Z-value is used to determine acoefficient V for determining the color as shown by the followingformula (step S43).V=(Z−ZF)/(ZN−ZF)

In the above formula, however, V=1.0 when V>1.0. V=0.0 when V<0.0.

Next, the determined coefficient V is used to determine the color C ofthe edge line as shown by the following formula (step S44).C=(CN−CF)×V+CF

Next, the determined color C is used to drawn the edge line (step S45).

FIG. 37 shows a flowchart illustrating the process of changing the colorof the edge line depending on the size of the object (number of pixels).

First of all, the threshold values PN, PF in the size of the object, theedge-line of which is to be drawn (which correspond to VTN, VTF in FIG.5B) as well as the colors CN, CF corresponding to these threshold valueshave previously been set (step S51).

Next, the number of pixels P (the number of longitudinal pixels×thenumber of transverse pixels) of the object (in two-dimensional image),the edge line of which is to be drawn on the screen, is determined (stepS52).

Next, the determined number of pixels P is used to determine thecoefficient V for determining the color as shown by the followingformula (step S53).V=(P−PF)/(PN−PF)

In the above formula, however, V=1.0 when V>1.0. V=0.0 when V<0.0.

Next, the determined coefficient V is used to determine the color C ofthe edge line (step S54). The determined color C is then used to drawnthe edge line (step S55).

FIG. 38 shows a flowchart illustrating the process of changing thetranslucency of the edge line depending on the distance (Z-value). FIG.38 is different from FIG. 36 only in the following points.

In place of the colors CN, CF, the translucencies αTN, αTF have been setat step S61.

At step S64, the coefficient V is used to determine the translucency αTof the edge line as shown by the following formula.αT=(αTN−αTF)×V+αTF

At step S65, the determined value αT is used to translucent-draw theedge line.

FIG. 39 shows a flowchart illustrating the process of changing thetranslucency of the edge line depending on the size of the object(number of pixels). FIG. 39 is different from FIG. 37 only in thefollowing points.

At step S71, the translucencies αTN, αTF have been set in place of thecolors CN, CF.

At step S74, the coefficient V is used to determine the translucency αTof the edge line as shown by the following formula.αT=(αTN−αTF)×V+αTF

At step S75, the determined value αT is used to translucent-draw theedge line.

4. Hardware Configuration

A hardware arrangement which can realize this embodiment is shown inFIG. 40.

A main processor 900 operates to execute various processings such asgame processing, image processing, sound processing and otherprocessings according to a program stored in a CD (information storagemedium) 982, a program transferred through a communication interface 990or a program stored in a RON (information storage medium) 950.

A coprocessor 902 is to assist the processing of the main processor 900and has a product-sum operator and analog divider which can performhigh-speed parallel calculation to execute a matrix (or vector)calculation at high speed. If a physical simulation for causing anobject to move or act (motion) requires the matrix calculation or thelike, the program running on the main processor 900 instructs (or asks)that processing to the coprocessor 902.

A geometry processor 904 is to perform a geometry processing such ascoordinate transformation, perspective transformation, light sourcecalculation, curve formation or the like and has a product-sum operatorand analog divider which can perform high-speed parallel calculation toexecute a matrix (or vector) calculation at high speed. For example, forthe coordinate transformation, perspective transformation or lightsource calculation, the program running on the main processor 900instructs that processing to the geometry processor 904.

A data expanding processor 906 is to perform a decoding process forexpanding image and sound compressed data or a process for acceleratingthe decoding process in the main processor 900. In the opening,intermission, ending or game scene, thus, an MPEG compressed animationimage maybe displayed. The image and sound data to be decoded may bestored in the storage devices including ROM 950 and CD 982 or mayexternally be transferred through the communication interface 990.

A drawing processor 910 is to draw or render an object constructed byprimitive surfaces such as polygons or curved faces at high speed. Ondrawing the object, the main processor 900 uses a DMA controller 970 todeliver the object data to the drawing processor 910 and also totransfer a texture to a texture storage section 924, if necessary. Thus,the drawing processor 910 draws the object in a frame buffer 922 at highspeed while performing a hidden-surface removal by the use of a Z-bufferor the like, based on the object data and texture. The drawing processor910 can also perform α-blending (or translucency processing),mip-mapping, fogging, tri-linear filtering, anti-aliasing, shading andso on. As the image for one frame is written into the frame buffer 922,that image is displayed on a display 912.

A sound processor 930 includes any multi-channel ADPCM sound source orthe like to generate high-quality game sounds such as BGMS, soundeffects and voices. The generated game sounds are outputted from aspeaker 932.

The operational data from a game controller 942, saved data from amemory card 944 and personal data may externally be transferred througha serial interface 940.

ROM 950 has stored a system program and so on. For an arcade gamesystem, the ROM 950 functions as an information storage medium in whichvarious programs have been stored. The ROM 950 may be replaced by anysuitable hard disk.

RAM 960 is used as a working area for various processors.

The DMA controller 970 controls the transfer of DMA between theprocessors and memories (such as RAMs, VRAMS, ROMs or the like).

CD drive 980 drives a CD 982 (information storage medium) in which theprograms, image data or sound data have been stored and enables theseprograms and data to be accessed.

The communication interface 990 is to perform data transfer between theimage generating system and any external instrument through a network.In such a case, the network connectable with the communication interface990 may take any of communication lines (analog phone line or ISDN) orhigh-speed serial interface bus. The use of the communication lineenables the data transfer to be performed through the INTERNET. If thehigh-speed serial interface bus is used, the data transfer may becarried out between the image generating system and any other gamesystem.

All the means of the present invention may be executed only throughhardware or only through a program which has been stored in aninformation storage medium or which is distributed through thecommunication interface. Alternatively, they may be executed boththrough the hardware and program.

If all the means of the present invention are executed both through thehardware and program, the information storage medium will have stored aprogram (and data) for executing the means of the present inventionthrough the hardware. More particularly, the aforementioned programinstructs the respective processors 902, 904, 906, 910 and 930 which arehardware and also delivers the data to them, if necessary. Each of theprocessors 902, 904, 906, 910 and 930 will execute the corresponding oneof the means of the present invention based on the instruction anddelivered data.

FIG. 41A shows an arcade game system to which this embodiment isapplied. Players enjoy a game by controlling levers 1102 and buttons1104 while viewing a game scene displayed on a display 1100. A systemboard (circuit board) 1106 included in the game system includes variousprocessor and memories which are mounted thereon. Information (programor data) for executing all the means of the present invention has beenstored in a memory 1108 on the system board 1106, which is aninformation storage medium. Such information will be referred to “storedinformation” later.

FIG. 41B shows a home game apparatus to which this embodiment isapplied. A player enjoys a game by manipulating game controllers 1202and 1204 while viewing a game picture displayed on a display 1200. Insuch a case, the aforementioned stored information pieces have beenstored in CD 1206 or memory cards 1208, 1209 which are detachableinformation storage media in the game system body.

FIG. 41C shows an example in which this embodiment is applied to a gamesystem which includes a host device 1300 and terminals 1304-1 to 1304-nconnected to the host device 1300 through a network (which is asmall-scale network such as LAN or a global network such as INTERNET)1302. In such a case, the above stored information pieces have beenstored in an information storage medium 1306 such as magnetic diskdevice, magnetic tape device, memory or the like which can be controlledby the host device 1300, for example. If each of the terminals 1304-1 to1304-n are designed to generate game images and game sounds in astand-alone manner, the host device 1300 delivers the game program andother data for generating game images and game sounds to the terminals1304-1 to 1304-n. On the other hand, if the game images and soundscannot be generated by the terminals in the stand-alone manner, the hostdevice 1300 will generate the game images and sounds which are in turntransmitted to the terminals 1304-1 to 1304-n.

In the arrangement of FIG. 41C, the means of the present invention maybe decentralized into the host device (or server) and terminals. Theabove information pieces for realizing the respective means of thepresent invention may be distributed and stored into the informationstorage media of the host device (or server) and terminals.

Each of the terminals connected to the network may be either of domesticor arcade type. When the arcade game systems are connected to thenetwork, it is desirable that each of the arcade game systems includes aportable information storage device (memory card or portable gamemachine) which can not only transmit the information between the arcadegame systems but also transmit the information between the arcade gamesystems and the home game systems.

The present invention is not limited to the things described inconnection with the above forms, but may be carried out in any ofvarious other forms.

For example, the invention relating to one of the dependent claims maynot contain part of the structural requirements in any claim to whichthe one dependent claim belongs. The primary part of the inventiondefined by one of the independent claim may be belong to any otherindependent claim.

It is particularly desirable that the parameter for changing the edgeline image of the object is the distance between the object and theviewpoint or the size of the perspectively transformed object. However,any other parameter equivalent to these parameters falls within thescope of the invention.

This embodiment has been described mainly with respect to the case wherethe image of the edge line is changed depending on the distance betweenthe object and the viewpoint or the size of the perspectivelytransformed object for avoiding such a problem that the edge line imageof the object is made unnecessarily conspicuous.

On the contrary, however, the image of the edge line may be changeddepending on the distance between the object and the viewpoint or thesize of the perspectively transformed object for making the edge lineimage of the object conspicuous. For example, within a certain range ofdistance, the edge line may be made more opaque as the distance betweenthe object and the viewpoint increases (or the size of the perspectivelytransformed object decreases). Alternatively, the color of the edge linemay gradually become a color different from CF (second color) asdescribed, as the distance between the object and the viewpointincreases (or the size of the perspectively transformed objectdecreases).

The technique of drawing the edge line of the object is particularlydesirable to use the texel interpolation type texture mapping process,but the present invention is not limited to such a technique. Forexample, the edge line of the object may be drawn through such atechnique as shown in FIGS. 42A to 42P.

This technique first draws an edge line image 420 (or an image filledwith the color of the edge line) on a region 410 in which the originalimage is to be drawn on a drawing region 400 (frame buffer or the like)at a position deviated upward by several pixels, as shown in FIGS. 42Aand 42B, similarly, the edge line image 420 is drawn on the above region410 at positions deviated by several pixels in the downward, rightwardand leftward directions, as shown in FIGS. 42C, 42D and 42E. Finally,the original image 430 is drawn in the same region 410 as shown in FIG.42F.

Since this technique can draws the edge line only through thetwo-dimensional processing, the processing load on the drawing processorincreases, but the processing load on CPU for performing thethree-dimensional processing can be reduced.

The function characteristics between the distance between the object andthe viewpoint or the size of the perspectively transformed object andthe color or translucency of the edge line may be in any of variousmodified forms. For example, the function characteristic may be a curvecharacteristic using a multi-dimensional function, rather than thelinear characteristic as shown in FIGS. 5A, 5B, 7A and 7B. Namely, themulti-dimensional function may interpolate between (VTN, CN) and (VTF,CF) or between (VTN, αTN) and (VTF, αTF), rather than the linearinterpolation.

The number of threshold values may be four or more, as shown in FIGS.43A and 43B. The number of threshold values is arbitrary. Alternatively,no threshold value may be provided. If the distance between the objectand the viewpoint or the size of the perspectively transformed object iswithin the range of VTN2 to VTN3 in such a case as shown in FIGS. 34Aand 34B, the color or translucency of the edge line may be maintainedsubstantially constant as described in connection with FIG. 8A.

The object for generating the image of the edge line is not necessarilydisplayed. The display of only the image of the edge line withoutdisplaying the object also falls within the scope of the invention. Insuch a case, any three-dimensional image such as a character drawn onlyby the edge line can be generated. This can provide a unique pictureeffect which would not be known in the art.

The bi-linear filtering type texture mapping processing is particularlydesirable as the texel interpolation type texture mapping process, butthe present invention is not limited to such a process.

It is particularly desirable to use the technique of generating thevirtual polygon as described in connection with FIGS. 16A to 18D.However, the present invention is not limited to such a technique, butmay be carried out in any of various other forms.

It is particularly desirable that the determination of the edge lineregion in the object is carried out based on the texel-interpolatedalpha value. However, the present invention is not limited to such adetermination, but may be carried out in any of various other forms.

The present invention may be applied to any of various games such asfighting games, shooting games, robot combat games, sports games,competitive games, roll-playing games, music playing games, dancinggames and so on.

Furthermore, the present invention can be applied to various gamesystems (image generating systems) such as arcade game systems, homegame systems, large-scaled multi-player attraction systems, simulators,multimedia terminals, image generating systems, game image generatingsystem boards and so on.

1. A game system which performs image generation, comprising: a drawingsection which generates an image as viewed from a given viewpoint withinan object space, and which draws an image of an edge line of an object,the edge line having constant thickness; and an edge line image changingsection which changes a parameter of the image of the edge line of theobject depending on a distance from the viewpoint, the parameter being aparameter other than the thickness of the edge line or a length of theedge line.
 2. The game system according to claim 1, wherein as thedistance from the viewpoint increases, the edge line image changingsection changes a color of the edge line of the object gradually to agiven second color.
 3. The game system according to claim 2, whereinwhen the distance from the viewpoint is substantially equal to adistance when the viewpoint follows the object while maintaining asubstantially constant distance from the object, the color of the edgeline of the object is maintained substantially constant.
 4. The gamesystem according to claim 2, wherein the color of the edge line of theobject is set to the second color when the distance from the viewpointbecomes larger than a given threshold value.
 5. The game systemaccording to claim 1, wherein as the distance from the viewpointincreases, the edge line image changing section changes the image of theedge line of the object to become gradually more transparent.
 6. Thegame system according to claim 5, wherein when the distance from theviewpoint is substantially equal to a distance when the viewpointfollows the object while maintaining a substantially constant distancefrom the object, a translucency of the edge line of the object ismaintained substantially constant.
 7. The game system according to claim5, wherein the image of the edge line of the object substantiallydisappears when the distance from the viewpoint becomes larger than agiven threshold value.
 8. The game system according to claim 2, whereinthe drawing section draws the image of the edge line of the object in anoutside area of edge of the object.
 9. The game system according toclaim 5, wherein the drawing section draws the image of the edge line ofthe object in an inside area of edge of the object.
 10. A game systemwhich performs image generation, comprising: a drawing section whichgenerates an image as viewed from a given viewpoint within an objectspace, and which draws an image of an edge line of an object, the edgeline having a constant thickness; and an edge line image changingsection which changes a parameter of the image of the edge line of theobject depending on a size of the object that has been perspectivelytransformed, the parameter being a parameter other than the thickness ofthe edge line or a length of the edge line.
 11. The game systemaccording to claim 10, wherein as the size of the perspectivelytransformed object decreases, the edge line image changing sectionchanges a color of the edge line of the object gradually to a givensecond color.
 12. The game system according to claim 11, wherein whenthe size of the perspectively transformed object is substantially equalto a size of the object when the viewpoint follows the object whilemaintaining a substantially constant distance from the object, the colorof the edge line of the object is maintained substantially constant. 13.The game system according to claim 11, wherein the color of the edgeline of the object is set to the second color when the size of theperspectively transformed object becomes smaller than a given thresholdvalue.
 14. The game system according to claim 10, wherein as the size ofthe perspectively transformed object decreases, the edge line imagechanging section changes the image of the edge line of the object tobecome gradually more transparent.
 15. The game system according toclaim 14, wherein when the size of the perspectively transformed objectis substantially equal to a size of the object when the viewpointfollows the object while maintaining a substantially constant distancefrom the object, a translucency of the edge line of the object ismaintained substantially constant.
 16. The game system according toclaim 14, wherein the image of the edge line of the object substantiallydisappears when the size of the perspectively transformed object becomessmaller than a given threshold value.
 17. The game system according toclaim 11, wherein the drawing section draws the image of the edge lineof the object in an outside area of edge of the object.
 18. The gamesystem according to claim 14, wherein the drawing section draws theimage of the edge line of the object in an inside area of edge of theobject.
 19. A computer-usable program embodied on an information storagemedium or in a earner wave, the program comprising a processing routinefor causing a computer to realize: a drawing routine which generates animage as viewed from a given viewpoint within an object space, and whichdraws an image of an edge line of an object, the edge line having aconstant thickness; and an edge line image changing routine whichchanges a parameter of the image of the edge line of the objectdepending on a distance from the viewpoint, the parameter being aparameter other than the thickness of the edge line or a length of theedge line.
 20. The program according to claim 19, wherein as thedistance from the viewpoint increases, the edge line image changingroutine changes a color of the edge line of the object gradually to agiven second color.
 21. The program according to claim 20, wherein whenthe distance from the viewpoint is substantially equal to a distancewhen the viewpoint follows the object while maintaining a substantiallyconstant distance from the object, the color of the edge line of theobject is maintained substantially constant.
 22. The program accordingto claim 20, wherein the color of the edge line of the object is set tothe second color when the distance from the viewpoint becomes largerthan a given threshold value.
 23. The program according to claim 19,wherein as the distance from the viewpoint increases, the edge lineimage changing routine changes the image of the edge line of the objectto become gradually more transparent.
 24. The program according to claim23, wherein when the distance from the viewpoint is substantially equalto a distance when the viewpoint follows the object while maintaining asubstantially constant distance from the object, a translucency of theedge line of the object is maintained substantially constant.
 25. Theprogram according to claim 23, wherein the image of the edge line of theobject substantially disappears when the distance from the viewpointbecomes larger than a given threshold value.
 26. The program accordingto claim 20, wherein the drawing routine draws the image of the edgeline of the object in an outside area of edge of the object.
 27. Theprogram according to claim 23, wherein the drawing routine draws theimage of the edge line of the object in an inside area of edge of theobject.
 28. A computer-usable program embodied on an information storagemedium or in a carrier wave, the program comprising a processing routinefor causing a computer to realize: a drawing routine which generates animage as viewed from a given viewpoint within an object space, and whichdraws an image of an edge line of an object, the edge line having aconstant thickness; and an edge line image changing routine whichchanges a parameter of the image of the edge line of the objectdepending on a size of the object that has been perspectivelytransformed, the parameter being a parameter other than the thickness ofthe edge line or a length of the edge line.
 29. The program according toclaim 28, wherein as the size of the perspectively transformed objectdecreases, the edge line image changing routine changes a color of theedge line of the object gradually to a given second color.
 30. Theprogram according to claim 29, wherein when the size of theperspectively transformed object is substantially equal to a size of theobject when the viewpoint follows the object while maintaining asubstantially constant distance from the object, the color of the edgeline of the object is maintained substantially constant.
 31. The programaccording to claim 29, wherein the color of the edge line of the objectis set to the second color when the size of the perspectivelytransformed object becomes smaller than a given threshold value.
 32. Theprogram according to claim 28, wherein as the size of the perspectivelytransformed object decreases, the edge line image changing routinechanges the image of the edge line of the object to become graduallymore transparent.
 33. The program according to claim 32, wherein whenthe size of the perspectively transformed object is substantially equalto a size of the object when the viewpoint follows the object whilemaintaining a substantially constant distance from the object, atranslucency of the edge line of the object is maintained substantiallyconstant.
 34. The program according to claim 32, wherein the image ofthe edge line of the object substantially disappears when the size ofthe perspectively transformed object becomes smaller than a giventhreshold value.
 35. The program according to claim 29, wherein thedrawing routine draws the image of the edge line of the object in anoutside area of edge of the object.
 36. The program according to claim32, wherein the drawing routine draws the image of the edge line of theobject in an inside area of edge of the object.
 37. An image generatingmethod to perform image generation, comprising: generating an image asviewed from a given viewpoint within an object space; drawing an imageof an edge line of an object, the edge line having a constant thickness;and changing a parameter of the image of the edge line of the objectdepending on a distance from the viewpoint, the parameter being aparameter other than the thickness of the edge line or a length of theedge line.
 38. The image generating method according to claim 37,wherein as the distance from the viewpoint increases, a color of theedge line of the object is gradually changed to a given second color.39. The image generating method according to claim 38, wherein when thedistance from the viewpoint is substantially equal to a distance whenthe viewpoint follows the object while maintaining a substantiallyconstant distance from the object, the color of the edge line of theobject is maintained substantially constant.
 40. The image generatingmethod according to claim 38, wherein the color of the edge line of theobject is set to the second color when the distance from the viewpointbecomes larger than a given threshold value.
 41. The image generatingmethod according to claim 37, wherein as the distance from the viewpointincreases, the image of the edge line of the object is gradually changedto more transparent.
 42. The image generating method according to claim41, wherein when the distance from the viewpoint is substantially equalto a distance when the viewpoint follows the object while maintaining asubstantially constant distance from the object, a translucency of theedge line of the object is maintained substantially constant.
 43. Theimage generating method according to claim 41, wherein the image of theedge line of the object substantially disappears when the distance fromthe viewpoint becomes larger than a given threshold value.
 44. The imagegenerating method according to claim 38, wherein the image of the edgeline of the object is drawn in an outside area of edge of the object.45. The image generating method according to claim 41, wherein the imageof the edge line of the object is drawn in an inside area of edge of theobject.
 46. An image generating method to perform image generation,comprising: generating an image as viewed from a given viewpoint withinan object space; drawing an image of an edge line of an object, the edgeline having a constant thickness; changing a parameter of the image ofthe edge line of the object depending on a size of the object that hasbeen perspectively transformed, the parameter being a parameter otherthan the thickness of the edge line or a length of the edge line. 47.The image generating method according to claim 46, wherein as the sizeof the perspectively transformed object decreases, a color of the edgeline of the object is gradually changed to a given second color.
 48. Theimage generating method according to claim 47, wherein when the size ofthe perspectively transformed object is substantially equal to a size ofthe object when the viewpoint follows the object while maintaining asubstantially constant distance from the object, the color of the edgeline of the object is maintained substantially constant.
 49. The imagegenerating method according to claim 47, wherein the color of the edgeline of the object is set to the second color when the size of theperspectively transformed object becomes smaller than a given thresholdvalue.
 50. The image generating method according to claim 46, wherein asthe size of the perspectively transformed object decreases, the image ofthe edge line of the object is gradually changed to more transparent.51. The image generating method according to claim 50, wherein when thesize of the perspectively transformed object is substantially equal to asize of the object when the viewpoint follows the object whilemaintaining a substantially constant distance from the object, atranslucency of the edge line of the object is maintained substantiallyconstant.
 52. The image generating method according to claim 50, whereinthe image of the edge line of the object substantially disappears whenthe size of the perspectively transformed object becomes smaller than agiven threshold value.
 53. The image generating method according toclaim 47, wherein the image of the edge line of the object is drawn inan outside area of edge of the object.
 54. The image generating methodaccording to claim 50, wherein the image of the edge line of the objectis drawn in an inside area of edge of the object.